﻿using System;
using System.Reflection;

namespace App_Code.Helpers
{
    /// <summary>
    /// Summary description for GeneralHelper
    /// </summary>
    public static class GeneralHelper
    {
        public static string GetVisualCronVersionInfo()
        {
            try
            {
                Assembly visualCronAPI = typeof (VisualCronAPI.Client).Assembly;
                AssemblyName name = visualCronAPI.GetName();

                Version ver = name.Version;
                return String.Format("VisualCron API version: {0}, protocol: {1}", ver,
                                     VisualCron.BuildInfo.ProtocolVersion);
            }
            catch
            {
                return null;
            }

        }
    }
}